﻿#region Copyright(C) 2012 NCS Pte. Ltd. All rights reserved.

// ==================================================================================================
// Copyright(C) 2012 NCS Pte. Ltd. All rights reserved.
//
// SYSTEM NAME	:   iConnect.Azure Application Framework
// COMPONENT ID :   NCS.IConnect.Azure.Diagnostics.AzureStorage.ICloudBlob
// COMPONENT DESC:  	
//
// CREATED DATE/BY:  08 June 2012 / Lu Ya Ming
//
// REVISION HISTORY:	
// DATE/BY			SR#/CS/PM#/OTHERS		DESCRIPTION OF CHANGE
// ==================================================================================================

#endregion

using System;

using Microsoft.WindowsAzure.StorageClient;

namespace NCS.IConnect.Cloud.Core.AzureStorage
{
    /// <summary>
    /// The interface of cloud blob.
    /// </summary>
    public interface ICloudBlob
    {
        /// <summary>
        /// Gets the service client.
        /// </summary>
        /// <value>
        /// The service client.
        /// </value>
        ICloudBlobClient ServiceClient { get; }

        /// <summary>
        /// Gets the container.
        /// </summary>
        /// <value>
        /// The container.
        /// </value>
        ICloudBlobContainer Container { get; }

        /// <summary>
        /// Gets the URI.
        /// </summary>
        /// <value>
        /// The URI.
        /// </value>
        Uri Uri { get; }

        /// <summary>
        /// Gets the properties.
        /// </summary>
        /// <value>
        /// The properties.
        /// </value>
        AzureBlobProperties Properties { get; }

        /// <summary>
        /// Downloads the text.
        /// </summary>
        /// <param name="options">The options.</param>
        /// <returns></returns>
        string DownloadText(BlobRequestOptions options = null);

        /// <summary>
        /// Uploads the text.
        /// </summary>
        /// <param name="content">The content.</param>
        void UploadText(string content);

        /// <summary>
        /// Fetches the attributes.
        /// </summary>
        /// <param name="options">The options.</param>
        void FetchAttributes(BlobRequestOptions options = null);
    }
}
